﻿package text {
	
	import text.TextFitterSettings;
	import flash.text.TextField;
	
	public class TextUtils {
		
		static public const UPPERCASE	:String = "UpperCase";
		static public const LOWERCASE	:String = "LowerCase";
		static public const NOCASE		:String = "noCase";
		
		public function TextUtils() {
			
		}
		
		/**
		 * Constrói um TextFitterSettings default, levando em conta apenas o case do texto a ser exibido
		 * @param	txtCase -> String para style do case: Valores: TextFitterSettings.NOCASE, TextFitterSettings.UPPERCASE
		 * 			e TextFitterSettings.LOWERCASE
		 * @return	-> objeto TextFitterSettings
		 */
		static public function getTextfitterSettings(textField:TextField, txtCase:String = "UpperCase"):TextFitterSettings {
			return new TextFitterSettings(textField.x, textField.y, Number(textField.defaultTextFormat.size), textField.height, txtCase)
		}
		
		
		
		
	}
	
}